package com.qcby.vo;

import lombok.Data;

import java.util.List;

@Data
public class PageVO<T> {
    private List<T> list;
    private Long totalCount;
    private Long pageSize;
    private Long currPage;
    private Long totalPage;
    
    public PageVO() {}
    
    public PageVO(List<T> list, Long totalCount, Long currPage, Long pageSize) {
        this.list = list;
        this.totalCount = totalCount;
        this.currPage = currPage;
        this.pageSize = pageSize;
        this.totalPage = (totalCount + pageSize - 1) / pageSize;
    }
}
